﻿(function(window){
	
	var slide = function(content, nav){
		this.content = content;
		this.nav = nav;
		this.current = 0;
		this.init();
	};
	
	slide.prototype = {
		init: function(){
			
			var _this = this;
			for(var i=0; i<4; i++){
				this.nav[i]['helpid'] = i;
				
				addEvent(this.nav[i], 'mouseover', function(){
					if(_this.current == this.helpid) return;
					//old content dispear
					_this.content[_this.current].style.display = 'none';
					//show current content
					_this.content[this.helpid].style.display = '';
					_this.current = this.helpid;
				});
			}
			return this;
		}
	};
	
	var sloo = function(content, nav){
		return new slide(content, nav);
	};
	
	window.sloo = sloo;
})(window);